<?
	require 'facebook.php';

	function getUserFriendList($facebook, $uid){
    try {
        $param  =   array(
                'method'  => 'friends.get',
                'uid'     => $uid,
                'flid'    => '',
                'callback'=> ''
        );
        $friends   =   $facebook->api($param);
        return $friends;
    }
    catch(Exception $o) {
        d($o);
    }
    return '';
	}
	
	function getUserFriendList2($facebook){
        $friends     =   $facebook->api('/me/friends');
        return $friends;
	}
	
	$facebook = new Facebook(array(
	'appId'  => '271110082964987',
	'secret' => '161832861ef987ccc5b028d44838e9c8',
	));
	
	$friend2 = getUserFriendList2($facebook);
	echo $friend2;
	

?>